import java.util.*;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 07 - 23
 * Time: 20:25
 */
public class Test {
    public static void main(String[] args) {
        TreeMap<String, Integer> map1 = new TreeMap<>();
        map1.put("this", 3);
        map1.put("that", 4);
        System.out.println(map1);
        Set<Map.Entry<String, Integer>> entries = map1.entrySet();
        for (Map.Entry<String, Integer> entry : entries) {
            System.out.println(entry.getKey() + " " + entry.getValue());
        }
        Set<String> set1 = new TreeSet<>();
        set1.add("hello");
        set1.add("apple");
        System.out.println(set1);
        for (String string : set1) {
            System.out.println(string);
        }
        HashMap<String, Integer> map2 = new HashMap<>();
    }
}
